<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>P131 【例6-2】demo02.html</title>
</head>

<body>
    <script>
        var myWindow;
        function openWin() {
            myWindow = window.open('', 'newWin', 'width=250,height=300');
            getPosSize();
        }
        function changeWin() {
            myWindow.moveBy(250, 250);
            myWindow.focus();
            myWindow.resizeTo(500, 350);
            getPosSize();
        }
        function getPosSize() {
            var x = myWindow.screenLeft, y = myWindow.screenTop;
            var inH = myWindow.innerHeight, inW = myWindow.innerWidth;
            var outH = myWindow.outerHeight, outW = myWindow.outerWidth;
            myWindow.document.write('<p>相对屏幕窗口的坐标：（' + x + ',' + y + '）</p>');
            myWindow.document.write('<p>文档的高度和宽度：（' + inH + ',' + inW + '）</p>');
            myWindow.document.write('<p>窗口的高度和宽度：（' + outH + ',' + outW + '）</p><hr>');
        }
    </script>
    <a href="../首页/page06.html">
        <h2>返回上一页面</h2>
    </a>
</body>

</html>